package com.quarters.service;

import com.quarters.bean.UserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.quarters.bean.layuiBean.ResultPage;
import com.quarters.bean.layuiBean.VoPage;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 冯政尚
 * @since 2019-09-02
 */
public interface UserInfoService extends IService<UserInfo> {

    /**
     * @param username
     * @param password
     * @param session
     * @return 后台登陆
     */
    boolean login(String username, String password, HttpSession session);


    /**
     * @param voPage
     * @return 后台查询
     */
    ResultPage<UserInfo> selectMyPage(VoPage voPage,Long userId);


    /**
     * @param username
     * @param password
     * @param menuId
     * @param id
     * @return 添加角色
     */
    Map<String, Object> saveUserInfo(String username, String password,String menuId,String quartersId ,String roleName,String openId, Long id,Integer flage);

    /**
     * @param id
     * @return 删除角色
     */
    Map deleteByIdUserInfo(Long id);

    //查询当前用户的所有下级管理范围
    List<UserInfo> selectName(Long userId);
}
